<?php
/* @var $this WordsController */
/* @var $model Words */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'words-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'words'); ?>
		<?php echo $form->textArea($model,'words',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'words'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'category_id'); ?>
		<?php echo $form->dropDownList($model, 'category_id', Category::loadItems()); ?>
		<?php echo $form->error($model,'category_id'); ?>
	</div>

	<div class="row">		
		<?php //echo CHtml::checkBoxList('Words[split]','1',array('1'=>'按句号问号(.?)分割'),array('id'=>'split'))?>
	
		<?php echo CHtml::checkBox('Words[split]',true,array('id'=>'split'))?>
		<?php echo CHtml::label('按句号问号(.?)分割','split'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>
</div><!-- form -->